package com.lvan.excelhandle.service;


import com.lvan.excelhandle.bean.StudentExcel;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * @author Lvan
 */
public interface ExcelService {

    /**
     * 解析学生记录来自Excel
     *
     * @param file    Excel
     * @param service ExcelService
     * @throws IOException io
     */
    void getStudent4Excel(MultipartFile file, ExcelService service) throws IOException;

    /**
     * 批量添加学生记录
     *
     * @param list List<StudentExcel>
     */
    void addStudentList(List<StudentExcel> list);

    /**
     * 导出学生信息
     *
     * @param response HttpServletResponse
     * @throws IOException io
     */
    void exportStudentInfo(HttpServletResponse response) throws IOException;
}
